package com.weblog.article;

import com.weblog.article.utils.TreeOperationUtil;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import util.IdWorker;
import util.JwtUtil;
import util.MapSizeUtil;

/**
 * @author MaoLin Wang
 * @date 2019/10/1923:13
 */
@SpringBootApplication
@EnableEurekaClient
@EnableFeignClients
@EntityScan(basePackages = {"com.weblog.model.article"})
public class ArticleApplication {
    public static void main(String[] args) {
        SpringApplication.run(ArticleApplication.class,args);
    }

    @Bean
    public IdWorker idWorker(){
        return new IdWorker(1,1);
    }

    @Bean
    public JwtUtil jwtUtil(){
        return new JwtUtil();
    }

    @Bean
    public TreeOperationUtil categoryOperationUtil(){
        return new TreeOperationUtil();
    }

    @Bean
    public MapSizeUtil mapSizeUtil(){
        return new MapSizeUtil();
    }
}
